/**
 * 
 */
package com.vision.admin.role.cl.ui;

import com.sencha.gxt.widget.core.client.event.SelectEvent;
import com.vision.admin.cl.AdminServices;
import com.vision.admin.cl.AdminTasks;
import com.vision.core.cl.AppPlace;
import com.vision.core.cl.BaseModule;
import com.vision.core.cl.mvp.AbstractPresenter;
import com.vision.core.cm.db.data.Role;

/**
 * @author Mark
 *
 */
public class RolesPresenter extends AbstractPresenter<Role> {

	public RolesPresenter() {
		super(AdminServices.roleSvc());
	}

	@Override
	protected String getDisplayText(Role obj) {
		return obj.getName();
	}
	
	@Override
	public void onAddClicked(SelectEvent e) {
		BaseModule.visit(new AppPlace(AdminTasks.ADD_ROLE));
	}

}
